// register
import register from '../../../scripts/angular/register.js';

// routers
import RaceRouter from '../routers/race.routers.js';

// services
import RaceService from '../services/raceService.js';
import CpService from '../../cp/services/cpService.js';
import CourseService from '../../course/services/courseService.js';

// controllers
import RaceListController from '../controllers/racelist.controller.js';
import RaceCreateController from '../controllers/racecreate.controller.js';
import RaceEditController from '../controllers/raceedit.controller.js';
import RaceInfoController from '../controllers/raceinfo.controller.js';
import RaceDetailController from '../controllers/racedetail.controller.js';
import NavigationController from '../controllers/navigation.controller.js';


angular
	.module('race.module', [
		'ngAnimate', 
		'ngSanitize', 
		'ui.router',
	    'ngMessages',  
		'chieffancypants.loadingBar', 
		'ngDialog',  
	    'mgcrea.ngStrap', 
		'oc.lazyLoad',
		'ng-sortable'
	])
	.config(RaceRouter)
	.controller('RaceListController', RaceListController)
	.controller('RaceCreateController', RaceCreateController)
	.controller('RaceEditController', RaceEditController)
	.controller('RaceInfoController', RaceInfoController)
	.controller('RaceDetailController', RaceDetailController)
	.controller('NavigationController', NavigationController);


register('race.module')
    .factory('RaceService', RaceService)
    .factory('CpService', CpService);